/**
 * 
 */
package sailing.filters.ui.laf;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JComponent;
import javax.swing.plaf.PanelUI;

import cjlite.logger.Logger;

/**
 * @author kevin
 * 
 */
public class FilterPanelUI extends PanelUI {
	private static Logger logger = Logger.thisClass();

	private int borderWidth = 2;
	private Color borderOutSideColor = new Color(230, 230, 230);
	private Color borderInnerSideColor = new Color(200, 200, 200);

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.swing.plaf.ComponentUI#paint(java.awt.Graphics, javax.swing.JComponent)
	 */
	@Override
	public void paint(Graphics g, JComponent c) {
		// logger.trace("component[{0}], width={1},height={2}", c.toString(), c.getSize().getWidth(), c.getSize()
		// .getHeight());

		g.setColor(borderOutSideColor);
		g.fillRect(0, 0, c.getWidth(), borderWidth);
		g.fillRect(0, 0, borderWidth, c.getHeight());
		g.fillRect(c.getWidth() - borderWidth, 0, borderWidth, c.getHeight());
		g.fillRect(0, c.getHeight() - borderWidth, c.getWidth(), borderWidth);

		g.setColor(borderInnerSideColor);
		g.drawRect(borderWidth, borderWidth, c.getWidth() - borderWidth - borderWidth - 1, c.getHeight() - borderWidth
				- borderWidth - 1);
	}
	
	
}
